<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    #div1{
      background: red;
      margin-bottom: 50px;
    }
    #div2{
      background: yellow;
      margin-top: 300px;
    }
  </style>
</head>
<body>
<div id="div1">123</div>
<div id="div2">456</div>
</body>
</html>